local _, Ovale = ...
local OvaleScripts = Ovale.OvaleScripts

do
	local name = "ovale_warrior_spells"
	local desc = "[5.4.7] Ovale: Warrior spells"
	local code = [[
# Warrior spells and functions.

Define(avatar 107574)
	SpellInfo(avatar cd=180)
	SpellInfo(avatar buff_cdr=cooldown_reduction_strength_buff specialization=arms)
	SpellInfo(avatar buff_cdr=cooldown_reduction_strength_buff specialization=fury)
Define(avatar_talent 16)
Define(bastion_of_defense 84608)
Define(battle_shout 6673)
	SpellInfo(battle_shout cd=60 rage=-20)
	SpellInfo(battle_shout cd=30 rage=-10 glyph=glyph_of_hoarse_voice)
Define(battle_stance 2457)
	SpellInfo(battle_stance cd=1.5 to_stance=warrior_battle_stance)
Define(berserker_rage 18499)
	SpellInfo(berserker_rage cd=30 rage=-10)
Define(berserker_stance 2458)
	SpellInfo(berserker_stance cd=1.5 to_stance=warrior_berserker_stance)
Define(bladestorm 46924)
	SpellInfo(bladestorm cd=60)
	SpellInfo(bladestorm buff_cdr=cooldown_reduction_strength_buff specialization=arms)
	SpellInfo(bladestorm buff_cdr=cooldown_reduction_strength_buff specialization=fury)
Define(bladestorm_talent 10)
Define(blood_and_thunder 84615)
Define(bloodbath 12292)
	SpellInfo(bloodbath cd=60)
	SpellInfo(bloodbath buff_cdr=cooldown_reduction_strength_buff specialization=arms)
	SpellInfo(bloodbath buff_cdr=cooldown_reduction_strength_buff specialization=fury)
	SpellAddBuff(bloodbath bloodbath_buff=1)
Define(bloodbath_buff 12292)
	SpellInfo(bloodbath_buff duration=12)
Define(bloodbath_talent 17)
Define(bloodsurge 46915)
Define(bloodsurge_buff 46916)
	SpellInfo(bloodsurge_buff duration=15 maxstacks=3)
Define(bloodthirst 23881)
	SpellInfo(bloodthirst cd=4.5 rage=-10)
	SpellAddTargetDebuff(bloodthirst deep_wounds_debuff=1 if_spell=deep_wounds)
Define(charge 100)
	SpellInfo(charge cd=20 rage=20)
	SpellInfo(charge cd=12 talent=juggernaut_talent)
	SpellInfo(charge rage=35 glyph=glyph_of_bull_rush)
Define(cleave 845)
	SpellInfo(cleave cd=1.5 rage=30)
	SpellInfo(cleave buff_rage_none=cleave_heroic_strike_no_rage_buff)
	SpellAddBuff(cleave cleaving_buff=0)
	SpellAddBuff(cleave glyph_incite_buff=-1 glyph=glyph_of_incite)
	SpellAddBuff(cleave ultimatum_buff=0 if_spell=ultimatum)
Define(cleaving_buff 65156)
	SpellInfo(cleaving_buff duration=6)
SpellList(cleave_heroic_strike_no_rage_buff cleaving_buff ultimatum_buff)
Define(colossus_smash 86346)
	SpellInfo(colossus_smash cd=20)
	SpellAddTargetDebuff(colossus_smash colossus_smash_debuff=1)
	SpellAddTargetDebuff(colossus_smash weakened_armor_debuff=1 glyph=glyph_of_colossus_smash)
Define(colossus_smash_debuff 86346)
	SpellInfo(colossus_smash duration=6)
Define(commanding_shout 469)
	SpellInfo(commanding_shout cd=60 rage=-20)
	SpellInfo(commanding_shout cd=30 rage=-10 glyph=glyph_of_hoarse_voice)
Define(death_sentence_buff 144442)	# tier16_4pc_melee_buff
	SpellInfo(death_sentence_buff duration=12)
Define(deep_wounds 115767)
Define(deep_wounds_debuff 115767)
	SpellInfo(deep_wounds_debuff duration=15 tick=3)
Define(defensive_stance 71)
	SpellInfo(defensive_stance cd=1.5 to_stance=warrior_defensive_stance)
Define(demoralizing_banner 114203)
	SpellInfo(demoralizing_banner cd=180)
Define(demoralizing_shout 1160)
	SpellInfo(demoralizing_shout cd=60)
	SpellInfo(demoralizing_shout buff_cdr=cooldown_reduction_tank_buff)
Define(devastate 20243)
	SpellAddTargetDebuff(devastate weakened_armor_debuff=1)
	SpellAddTargetDebuff(devastate deep_wounds_debuff=1 if_spell=deep_wounds)
Define(die_by_the_sword 118038)
	SpellInfo(die_by_the_sword cd=120)
Define(disrupting_shout 102060)
	SpellInfo(disrupting_shout cd=40)
Define(disrupting_shout_talent 9)
Define(dragon_roar 118000)
	SpellInfo(dragon_roar cd=60)
	SpellInfo(dragon_roar buff_cdr=cooldown_reduction_strength_buff specialization=arms)
	SpellInfo(dragon_roar buff_cdr=cooldown_reduction_strength_buff specialization=fury)
Define(dragon_roar_talent 12)
Define(enrage_buff 12880)
	SpellInfo(enrage_buff duration=6)
Define(enraged_regeneration 55694)
	SpellInfo(enraged_regeneration cd=60)
Define(enraged_regeneration_talent 4)
Define(execute 5308)
	SpellInfo(execute rage=30)
	SpellInfo(execute buff_rage_none=death_sentence_buff itemset=T16_melee itemcount=4)
	SpellAddBuff(execute sudden_execute_buff=1 if_spell=sudden_death)
Define(glyph_of_bull_rush 94372)
Define(glyph_of_colossus_smash 89003)
Define(glyph_of_death_from_above 63325)
Define(glyph_incite_buff 122016)
	SpellInfo(glyph_incite_buff duration=10 maxstacks=3)
Define(glyph_of_furious_sundering 63326)
Define(glyph_of_gag_order 58357)
Define(glyph_of_hoarse_voice 58387)
Define(glyph_of_incite 122013)
Define(glyph_of_recklessness 94374)
Define(glyph_of_resonating_power 58356)
Define(glyph_of_rude_interruption 58372)
Define(glyph_of_shield_wall 63329)
Define(glyph_of_spell_reflection 63328)
Define(heroic_leap 6544)
	SpellInfo(heroic_leap cd=45)
	SpellInfo(heroic_leap addcd=-15 glyph=glyph_of_death_from_above)
	SpellInfo(heroic_leap buff_cdr=cooldown_reduction_strength_buff specialization=arms)
	SpellInfo(heroic_leap buff_cdr=cooldown_reduction_strength_buff specialization=fury)
	SpellInfo(heroic_leap buff_cdr=cooldown_reduction_tank_buff specialization=protection)
Define(heroic_strike 78)
	SpellInfo(heroic_strike rage=30 cd=1.5)
	SpellInfo(heroic_strike buff_rage_none=cleave_heroic_strike_no_rage_buff)
	SpellAddBuff(heroic_strike cleaving_buff=0)
	SpellAddBuff(heroic_strike glyph_incite_buff=-1 glyph=glyph_of_incite)
	SpellAddBuff(heroic_strike ultimatum_buff=0 if_spell=ultimatum)
Define(heroic_throw 57755)
	SpellInfo(heroic_throw cd=30)
Define(impending_victory 103840)
	SpellInfo(impending_victory rage=10 cd=30)
	SpellInfo(impending_victory buff_rage_none=victorious_buff)
	SpellAddBuff(impending_victory victorious=0)
	SpellAddBuff(impending_victory tier15_2pc_tank_buff=0 itemset=T15_tank itemcount=2)
Define(impending_victory_talent 6)
Define(juggernaut_talent 1)
Define(last_stand 12975)
	SpellInfo(last_stand cd=180)
	SpellInfo(last_stand addcd=-60 itemset=T14_tank itemcount=2)
	SpellInfo(last_stand buff_cdr=cooldown_reduction_tank_buff)
	SpellAddBuff(last_stand last_stand_buff=1)
Define(last_stand_buff 12975)
	SpellInfo(last_stand_buff duration=20)
Define(meat_cleaver 12950)
Define(meat_cleaver_buff 85739)
	SpellInfo(meat_cleaver_buff duration=10 maxstacks=3)
Define(mortal_strike 12294)
	SpellInfo(mortal_strike cd=6 rage=-10)
	SpellAddBuff(mortal_strike taste_for_blood_buff=2 if_spell=taste_for_blood)
	SpellAddTargetDebuff(mortal_strike deep_wounds_debuff=1 if_spell=deep_wounds)
Define(overpower 7384)
	SpellInfo(overpower rage=10)
	SpellInfo(overpower buff_rage_none=sudden_execute_buff)
	SpellAddBuff(overpower sudden_execute_buff=0)
	SpellAddBuff(overpower taste_for_blood_buff=-1 if_spell=taste_for_blood)
Define(pummel 6552)
	SpellInfo(pummel cd=15)
Define(raging_blow 85288)
	SpellInfo(raging_blow rage=10)	
	SpellAddBuff(raging_blow raging_blow_buff=-1)
	SpellAddBuff(raging_blow meat_cleaver_buff=0 if_spell=meat_cleaver)
Define(raging_blow_buff 131116)
	SpellInfo(raging_blow_aura duration=12 maxstacks=2)
Define(rallying_cry 97462)
	SpellInfo(rallying_cry cd=180)
Define(recklessness 1719)
	SpellInfo(recklessness cd=180)
	SpellInfo(recklessness buff_cdr=cooldown_reduction_strength_buff specialization=arms)
	SpellInfo(recklessness buff_cdr=cooldown_reduction_strength_buff specialization=fury)
	SpellInfo(recklessness buff_cdr=cooldown_reduction_tank_buff specialization=protection)
	SpellAddBuff(recklessness recklessness_buff=1)
Define(recklessness_buff 1719)
	SpellInfo(recklessness_buff duration=12)
	SpellInfo(recklessness_buff addduration=6 glyph=glyph_of_recklessness)
Define(revenge 6572)
	SpellInfo(revenge rage=-20 cd=9)
	SpellInfo(revenge rage=-20 if_stance=warrior_defensive_stance)
Define(safeguard 114029)
	SpellInfo(safeguard cd=30)
Define(safeguard_talent 14)
Define(seasoned_soldier 12712)
Define(shattering_throw 64382)
	SpellInfo(shattering_throw cd=300)
	SpellAddTargetDebuff(shattering_throw shattering_throw_debuff=1)
Define(shattering_throw_debuff 64382)
	SpellInfo(shattering_throw_debuff duration=10)
Define(shield_barrier 112048)
	SpellInfo(shield_barrier cd=1.5 rage=finisher min_rage=20 max_rage=60)
Define(shield_block 2565)
	SpellInfo(shield_block cd=1.5 rage=60)
	SpellInfo(shield_block rage=55 itemset=T14_tank itemcount=4)
Define(shield_slam 23922)
	SpellInfo(shield_slam cd=6)
	SpellInfo(shield_slam rage=-20 if_stance=warrior_defensive_stance)
	SpellInfo(shield_slam buff_rage=sword_and_board_buff buff_rage_amount=-5 if_spell=sword_and_board)
	SpellAddBuff(shield_slam sword_and_board_buff=0 if_spell=sword_and_board)
Define(shield_wall 871)
	SpellInfo(shield_wall cd=300)
	SpellInfo(shield_wall addcd=120 glyph=glyph_of_shield_wall)
	SpellInfo(shield_wall addcd=-60 if_spell=bastion_of_defense)
	SpellAddBuff(shield_wall shield_wall_buff=1)
Define(shield_wall_buff 871)
	SpellInfo(shield_wall duration=12)
	SpellInfo(shield_wall buff_cdr=cooldown_reduction_strength_buff specialization=arms)
	SpellInfo(shield_wall buff_cdr=cooldown_reduction_strength_buff specialization=fury)
	SpellInfo(shield_wall buff_cdr=cooldown_reduction_tank_buff specialization=protection)
Define(shockwave 46968)
	SpellInfo(shockwave cd=40)
	SpellInfo(shockwave buff_cdr=cooldown_reduction_strength_buff specialization=arms)
	SpellInfo(shockwave buff_cdr=cooldown_reduction_strength_buff specialization=fury)
Define(shockwave_talent 11)
Define(skull_banner 114207)
	SpellInfo(skull_banner cd=180)
	SpellAddBuff(skull_banner skull_banner_buff=1)
Define(skull_banner_buff 114206)
	SpellInfo(skull_banner_buff duration=10)
Define(slam 1464)
	SpellInfo(slam rage=25)
Define(spell_reflection 23920)
	SpellInfo(spell_reflection cd=25)
	SpellInfo(spell_reflection addcd=-5 glyph=glyph_of_spell_reflection)
Define(storm_bolt 107570)
	SpellInfo(storm_bolt cd=30)
	SpellInfo(storm_bolt buff_cdr=cooldown_reduction_strength_buff specialization=arms)
	SpellInfo(storm_bolt buff_cdr=cooldown_reduction_strength_buff specialization=fury)
Define(storm_bolt_talent 18)
Define(sudden_death 29725)
Define(sudden_execute_buff 139958)
	SpellInfo(sudden_execute_buff duration=10)
Define(sunder_armor 7386)
	SpellInfo(sunder_armor rage=15 glyph=!glyph_of_furious_sundering)
	SpellAddTargetDebuff(sunder_armor weakened_armor_debuff=1)
Define(sweeping_strikes 12328)
	SpellInfo(sweeping_strikes cd=10 rage=30)
	SpellAddBuff(sweeping_strikes sweeping_strikes_buff=1)
Define(sweeping_strikes_buff 12328)
	SpellInfo(sweeping_strikes_buff duration=10)
Define(sword_and_board 46953)
Define(sword_and_board_buff 50227)
	SpellInfo(sword_and_board_buff duration=5)
Define(taste_for_blood 56636)
Define(taste_for_blood_buff 60503)
	SpellInfo(taste_for_blood_buff duration=12 maxstacks=5)
Define(thunder_clap 6343)
	SpellInfo(thunder_clap cd=6 rage=20)
	SpellInfo(thunder_clap addcd=3 glyph=glyph_of_resonating_power)
	SpellInfo(thunder_clap rage=10 if_spell=seasoned_soldier)
	SpellInfo(thunder_clap rage=0 if_spell=unwavering_sentinel)
	SpellAddTargetDebuff(thunder_clap weakened_blows_debuff=1)
	SpellAddTargetDebuff(thunder_clap deep_wounds_debuff=1 if_spell=blood_and_thunder)
Define(tier15_2pc_tank_buff 138279)
	SpellInfo(tier15_2pc_tank_buff duration=15)
Define(ultimatum 122509)
Define(ultimatum_buff 122510)
	SpellInfo(ultimatum_buff duration=10)
Define(unwavering_sentinel 29144)
Define(vengeance_buff 132365)
	SpellInfo(vengeance_buff duration=20)
Define(victorious 32216)
	SpellInfo(victorious duration=20)
SpellList(victorious_buff tier15_2pc_tank_buff victorious)
Define(victory_rush 34428)
	SpellAddBuff(victory_rush victorious=0)
	SpellAddBuff(victory_rush tier15_2pc_tank_buff=0 itemset=T15_tank itemcount=2)
Define(vigilance 114030)
	SpellInfo(vigilance cd=120)
Define(vigilance_talent 15)
Define(weakened_armor_debuff 113746)
	SpellInfo(weakened_armor_debuff duration=30 maxstacks=3)
Define(weakened_blows_debuff 115798)
	SpellInfo(weakened_blows_debuff duration=30)
Define(wild_strike 100130)
	SpellInfo(wild_strike rage=30)
	SpellInfo(wild_strike buff_rage_none=bloodsurge_buff if_spell=bloodsurge)
	SpellAddBuff(wild_strike bloodsurge_buff=-1 if_spell=bloodsurge)
Define(whirlwind 1680)
	SpellInfo(whirlwind rage=30)
	SpellInfo(whirlwind rage=20 if_spell=seasoned_soldier)
Define(wild_strike 100130)
	SpellInfo(wild_strike rage=30)
	SpellInfo(wild_strike buff_rage_none=bloodsurge_buff if_spell=bloodsurge)
	SpellAddBuff(wild_strike bloodsurge_buff=-1)
]]

	OvaleScripts:RegisterScript("WARRIOR", name, desc, code, "include")
end
